@charset "UTF-8";
header {
  background-color: #454d5d;
  color: #ccc;
}

#toolbar-handler {
  display: none;
}
#toolbar-handler .toolbar-handler-icon {
  width: 5px;
  height: 5px;
  margin: auto;
  border: solid #ccc;
  border-width: 2px 2px 0 0;
  -webkit-transform: rotate(135deg);
  transform: rotate(135deg);
}

#toolbar-close-button {
  display: none;
}

@media all and (max-height: 480px) {
  header.closeable .navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: top 0.4s ease;
    background-color: rgba(69, 77, 93, 0.85);
  }
  header.closeable .navbar #toolbar-close-button {
    display: initial;
  }

  header.closeable.closed #toolbar-handler {
    display: initial;
    position: absolute;
    right: 0px;
    top: 0px;
    width: 40px;
    height: 10px;
    background-color: rgba(69, 77, 93, 0.7);
  }
  header.closeable.closed .navbar {
    top: -44px;
  }
}
.navbar {
  max-width: 640px;
  margin: 0 auto;
  padding: 0.2rem 0;
  flex-wrap: nowrap;
}
.navbar .navbar-center {
  flex: 1;
  min-width: 0;
}
.navbar .navbar-brand {
  color: #ccc;
}
.navbar .navbar-section {
  flex: 0;
}
.navbar .btn-link {
  font-size: large;
  color: #ccc;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.navbar .btn.btn-link:focus,
.navbar .btn.btn-link:hover,
.navbar .btn.btn-link:active,
.navbar .btn.btn-link.active {
  color: #eee;
}

#volume-control {
  float: right;
  white-space: nowrap;
}

#volume-control-icon {
  font-size: 20px;
  width: 26px;
  padding: 5px;
  vertical-align: middle;
}

#volume-control-slider {
  width: 60px;
  height: 30px;
  vertical-align: middle;
}

#loader {
  max-width: 640px;
  margin: 2ex auto 0;
}
#loader h1 {
  font-size: 1.6rem;
}
#loader ul {
  list-style-type: none;
}
#loader li {
  color: #5764c6;
}
#loader li:before {
  font-family: FontAwesome;
  content: "";
  padding-right: 0.5em;
}
#loader li.notready {
  color: #808080;
}
#loader li.notready:after {
  content: " (unselected)";
}
#loader li[lang=ja].notready:after {
  content: " (未選択)";
}
#loader #unsupported {
  max-width: 640px;
  margin: 2ex auto 0;
  color: red;
}
#loader .language-selector {
  text-align: right;
}

#loader.module-loading .hidden-while-loading {
  display: none;
}
#loader.module-loading .show-while-loading {
  display: block;
}

body {
  min-height: 100vh;
}

body.game {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  min-height: initial;
  display: flex;
  flex-direction: column;
}

.before-game-start .hidden-until-game-start {
  display: none;
}

.contents {
  flex: 1;
  display: flex;
}

.bgblack-fade {
  background-color: black;
  transition-property: background-color;
  transition-duration: 1s;
  transition-timing-function: linear;
}

#xsystem35 {
  margin: auto;
}

#xsystem35.fit {
  margin: 0;
  flex: 1;
}

/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten {
  border: 0px none;
}

#xsystem35.fit.pillarbox canvas.emscripten {
  height: 100%;
  max-height: 100vh;
  margin: auto;
  display: block;
}

#xsystem35.fit.letterbox {
  display: flex;
  align-items: center;
}
#xsystem35.fit.letterbox canvas.emscripten {
  width: 100%;
}

.pixelated {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}

.modal-container {
  width: initial;
}

.modal.active .modal-overlay {
  background-color: rgba(69, 77, 93, 0.5);
}

.settings section > div {
  padding-left: 1rem;
}
.settings select {
  width: initial;
}

#textlog-modal .modal-container {
  max-width: 90vw;
  background-color: rgba(255, 255, 255, 0.85);
}
#textlog-modal pre {
  margin: 0;
}

.toast-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 400px;
  z-index: 500;
}

.toast {
  -webkit-animation: slide-down 0.2s ease 1;
  animation: slide-down 0.2s ease 1;
  margin: 5px;
}
